Repository navigation
Register the masks: show a failed folder check in cell 5, never crash on the next press (#580) - #581
Draft
guijacquemet wants to merge 1 commit into
Draft
guijacquemet wants to merge 1 commit into
guijacquemet wants to merge 1 commit into
Conversation
… on the next press When the folder check that Register the masks makes with the masks folder failed (an OSError such as Drive not answering, or a coded refusal), cell 5 said to confirm the axes again in cell 3, the reason was drawn only in cell 3, and every later press (and cell 5 run again) raised AttributeError out of the click handler because app.preflight was None. Cell 5 now shows CHECK_FAILED with cell 3's reason and continues once cell 3's check is made again; an unexpected error during a press is shown in cell 5 (STOPPED) and re-raised. Nothing checked, declared or written changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WX6rdMV1r5jUPUR94kxV5a
guijacquemet
pushed a commit
that referenced
this pull request
Nov 26, 2026
Fixes #580 on top of #578's Register wait: a failed re-check stops with CHECK_FAILED and cell 3's reason; later presses and cell 5 run again refuse without AttributeError; an unexpected error is shown in cell 5 (STOPPED) and re-raised, with the wait's "Stopped after" line. Conflicts resolved so both fixes hold; the tests of #581 use #578's question (choices, not ticks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VbytvF3Gsa85ix8Ne2yMDW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #580. Draft: do not merge.
Change (
notebook_mask_register.py)check_folder()returns None) stops withCHECK_FAILED. The message includes cell 3's own reason and says what to do: Check folder in cell 3, confirm the axes, Register again. Before, it showedAXES_AGAIN.refusal()gives the sameCHECK_FAILEDwhile the app has no check after a re-check that cell 5 made._app_runno longer dereferencesapp.preflightwhen it is None. Before, every later press, and cell 5 run again, raisedAttributeErrorout of the click handler.register()wraps its body (_register). An unexpected error, or an interrupt, setsSTOPPEDin cell 5's status and is still raised.Nothing that is checked, declared or written changes. The success path is the same calls in the same order.
Tests
tests/test_notebook_preprocessing_cellpose.py:OSError) says so in cell 5 and not the axes line;RunInputsseesCells;RuntimeErroris shown in cell 5 and re-raised.tests/test_notebook_preprocessing_cellpose.py+tests/test_notebook_preprocessing_cellpose_file.py: 39 passed.ruff check,ruff format --checkandtools/check.py --rulespass.tools/check.pywas not run.AXES_AGAINline, thenAttributeErroron press 2 and on a cell 5 re-run). The new test module importsSTOPPED, so it does not collect on the old code.Overlap: draft #578 rewrites
register()for its progress lines. Whichever merges second needs a small rebase. The logic here is independent of it.Generated by Claude Code